package is.web.xdumper.client;

/**
 *
 * @author aspr0
 */
public class XdumperHtml
{
    public final String[] ADVICE = new String[]
    {
        /* Common (0 ..) */
        "Select action to perform",
        "Action cancelled. You may restart with a new one.",
        /* Export (2 ..) */
        "Select entity to dump",
        "Select items to dump",
        "None selected, you could not pass",
        "Dump successful",
        /* Import (6 ..) */
        "Provide file to import",
        "File format is incorrect, you could not pass",
        "Dump references are broken, you could not pass",
        "Some dump items exist in DB, select whether to rewrite",
        "Import successfull"
    };
    public final String ADVICE_CANVAS = "<div class=\"advice\">%s</div>";
    public final String FORM_DIV_ACTION =
            "<form method=\"post\">"
            + "<div class=\"action\">"
            + "%s"
            + "</div>"
            + "</form>";
    public final String FORM_MULTIPART_DIV_ACTION =
            "<form enctype=\"multipart/form-data\" method=\"post\">"
            + "<div class=\"action\">"
            + "%s"
            + "</div>"
            + "</form>";
    /**
     * Format args "id, name, value, text"
     */
    public final String DIV_ACTION_INPUT_RADIO =
            "<div class=\"actionInputRadio\" onclick=\"enableChecked('%1$s')\">"
            + "<input type=\"radio\" name=\"%2$s\" value=\"%3$s\" id=\"%1$s\">%4$s"
            + "</div>";
    /**
     * Format args "id, name, value, text"
     */
    public final String DIV_ACTION_INPUT_CHECKBOX =
            "<div class=\"actionInputRadio\" onclick=\"toggleChecked('%1$s')\">"
            + "<input type=\"checkbox\" name=\"%2$s\" value=\"%3$s\" id=\"%1$s\" onclick=\"toggleChecked('%1$s')\">%4$s"
            + "</div>";
    public final String DIV_ACTION_INPUT = "<div class=\"actionInput\">%s</div>";
//    public final String INPUT_RADIO = "";
    /**
     * Name, value
     */
    public final String INPUT_HIDDEN = "<input type=\"hidden\" name=\"%s\" value=\"%s\">";
    public final String INPUT_HIDDEN_IDS_COUNT = "<input type=\"hidden\" name=\"idsCount\" value=\"%s\" id=\"idsCount\">";
    /**
     * Format args name, value, text
     */
    public final String INPUT_CHECKBOX = "<input type=\"checkbox\" name=\"%s\" value=\"%s\">%s<br>";
    public final String INPUT_SUBMIT_DUMP =
            "<button type=\"submit\" name=\"submit\" value=\"dump\">"
            + "<img src=\"../img/xdumper-export.png\" style=\"vertical-align: middle; margin-right: 7px;\">"
            + "Dump selected"
            + "</button>";
    public final String INPUT_SUBMIT_NEXT = "<input type=\"submit\" name=\"submit\" value=\"Next\"> ";
    public final String INPUT_SUBMIT_BACK = "<input type=\"submit\" name=\"submit\" value=\"Back\"> ";
    public final String INPUT_SUBMIT_CANCEL = "<input type=\"submit\" name=\"submit\" value=\"Cancel\"> ";
    /**
     * костыль
     */
    public final String INPUT_SUBMIT_CANCEL_JS =
            "<input "
            + "type=\"submit\" "
            + "name=\"submit\" "
            + "value=\"Cancel\" "
            + "onclick=\"document.location.href=\'.\'; return false;\"> ";
    public final String INPUT_SUBMIT_FINISH = "<input type=\"submit\" name=\"submit\" value=\"Finish\"> ";
//    public final String INPUT_SUBMIT_DUMP = "<input type=\"submit\" name=\"submit\" value=\"Dump\"> ";
    public final String INPUT_SUBMIT_IMPORT = "<input type=\"submit\" name=\"submit\" value=\"Import\"> ";
    public final String INPUT_RESET = "<input type=\"reset\"> ";
    public final String INPUT_SELECT_ENTITY =
            "<select name=\"entity\" class=\"wide\">"
            + "<option value=\"department\">Department</option>"
            + "<option value=\"employee\">Employee</option>"
            + "<option value=\"region\">Region</option>"
            + "</select>";
    public final String INPUT_FILE = "<input type=\"file\" name=\"filer\" class=\"wide\">";
}
//
//            + "<input type=\"radio\" name=\"action\" id=\"radio1\"> import"
//            + "</div>"
//            + "<div class=\"actionInputRadio\" onclick=\"toggleRadio('radio2')\">"
//            + "<input type=\"radio\" name=\"action\" id=\"radio2\"> export